package com.itheima.homework.homework05;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        System.out.println("请选择主题：1.xxxx年xx月xx日，2.xxxx-xx-xx，3.xxxx/xx/xx");
        Scanner sc = new Scanner(System.in);
        int choice = sc.nextInt();

        switch (choice) {
            default:
                System.out.println("很抱歉，操作有误，已为您切换默认主题");
                System.out.println("主题切换成功,当前时间为：" + new SimpleDateFormat("yyyy年MM月dd日").format(new Date()));
                break;
            case 1:
                System.out.println("主题切换成功,当前时间为：" + new SimpleDateFormat("yyyy年MM月dd日").format(new Date()));
                break;
            case 2:
                System.out.println("主题切换成功,当前时间为：" +new SimpleDateFormat("yyyy-MM-dd ").format(new Date()));
                break;
            case 3:
                System.out.println("主题切换成功,当前时间为：" +new SimpleDateFormat("yyyy/MM/dd ").format(new Date()));
                break;
        }
    }
}
